#include<iostream>
using namespace std;
#include<vector>
#include<string>

class Solution
{
public:
    string numToChinese(int num) {
        //特殊情况单独处理
        int minNum = 1 << 31;
        if(num == minNum) {
            string ret = "负二十一亿四千七百四十八万三千六百四十八";
            cout << ret << endl;
            return ret;
        }
        bool isNegative = false;
        if(num < 0) {
            isNegative = true;
            num = 0-num;
        }
        string ret = isNegative ? "负" : ""; 
        ret += _1To999999999999(num);
        cout << "ret:" << ret << endl;
        return ret;
    }
    string _1To10(int num) {
        vector<string> vs = {
            "零", "一", "二", "三", "四", "五",
            "六", "七", "八", "九", "十"
        };
        if(num >= 1 && num <= 10) {
            return vs[num];
        } else {
            return "";
        }
    }
    string _1To99(int num) {
        if(num >= 1 && num <= 10) {
            return _1To10(num);
        } else if(num >= 11 && num <= 99){
            string ret = "";
            if(num >= 20) {
                ret += _1To10(num / 10);
            }
            ret += "十";
            ret += _1To10(num % 10);
            return ret;
        }
        return "";
    }
    string _1To999(int num) {
        if(num >= 1 && num <= 99) {
            return _1To99(num);
        } else if(num >= 100 && num <= 999){
            string ret = "";
            ret += _1To10(num / 100);
            ret += "百";
            if(num % 100 >= 20) {
                ret += _1To99(num % 100);
            } else if(num % 100 >= 10) {
                ret += "一";
                ret += _1To99(num % 100);
            } else if(num % 100 >= 1){
                ret += "零";
                ret += _1To99(num % 100);
            }
            return ret;
        }
        return "";
    }
    string _1To9999(int num) {
        if(num >= 1 && num <= 999) {
            return _1To999(num);
        } else if(num >= 1000 && num <= 9999){
            string ret = _1To10(num / 1000);
            ret += "千";
            //百位标志
            bool hundredBit = (num % 1000) / 100 == 0 ? false : true;
            if(hundredBit == false && num != 1000) {
                //不含百位需要增加一个零
                ret += "零";
                ret += _1To99(num % 1000);
            } else if(hundredBit == true){
                ret += _1To999(num % 1000);
            }
            return ret;
        }
        return "";
    }
    string _1To99999999(int num) {
        if(num >= 1 && num <= 9999) {
            //人总是喜欢在道德制高点批判别人
            //我们更应该见不贤而内自省也
            return _1To9999(num);
        } else if(num >= 10000 && num <= 99999999) {
            string ret = "";
            ret += _1To9999(num / 10000);
            ret += "万";
            if(num % 10000 == 0) {
                //不做任何处理
            } else if (num % 10000 < 1000){
                 ret += "零";
            }
            ret += _1To9999(num % 10000);
            return ret;
        }
        return "";
    }
    string _1To999999999999(int num) {
        if(num >= 1 && num <= 99999999) {
            return _1To99999999(num);
        } else if(num >= 100000000){
            string ret = "";
            ret += _1To9999(num / 100000000);
            cout << ret << endl;
            ret += "亿";
            if(num % 100000000 == 0) {
                //不做处理
            } else if(num % 100000000 < 10000000) {
                ret += "零";
            }
            ret += _1To99999999(num % 100000000);
            return ret;
        }
        return "零";
    }

    void test() {
        for(int i = 0; i < 101000000; i++) {
            string ret = numToChinese(i);
            break;
        }
    }
};

int main() {
    int num;
    cin >> num;
    // num = 2147483647;
    string ret1 = Solution().numToChinese(num);
    return 0;
}